/**
  *@file    board_pin.h
  *@brief   board IO allocation relationship
  *@author  zxf 2018-12-14
  *@version V1.0.0
  */
#ifndef __BOARD_PIN_H__
#define __BOARD_PIN_H__
#include "arch_if.h"

/* Exported define --------------------------------------*/

/** [EEPROM]
-------------------------------------------------*/
#define EE_SCL_PORT                    GPIOA
#define EE_SCL_PIN                     GPIO_PIN_0

#define EE_SDA_PORT                    GPIOA
#define EE_SDA_PIN                     GPIO_PIN_1

/** [LCD]
-------------------------------------------------*/
#define LCD_CLK_PORT                   GPIOA
#define LCD_CLK_PIN                    GPIO_PIN_3

#define LCD_STB_PORT                   GPIOA
#define LCD_STB_PIN                    GPIO_PIN_2

#define LCD_DIO_PORT                   GPIOB
#define LCD_DIO_PIN                    GPIO_PIN_0

/** [LED]
-------------------------------------------------*/
#define LED01_PORT                     GPIOB
#define LED01_PIN                      GPIO_PIN_1

#define LED02_PORT                     GPIOB
#define LED02_PIN                      GPIO_PIN_9

/** [Relay]
-------------------------------------------------*/
#define RELAY1_PORT                     GPIOB
#define RELAY1_PIN                      GPIO_PIN_3

#define RELAY2_PORT                     GPIOB
#define RELAY2_PIN                      GPIO_PIN_2

/** [RTC]
-------------------------------------------------*/
#define RTC_SCL_PORT                   GPIOB
#define RTC_SCL_PIN                    GPIO_PIN_10

#define RTC_SDA_PORT                   GPIOB
#define RTC_SDA_PIN                    GPIO_PIN_12

/** [Energy]USART1
-------------------------------------------------*/
#define ENG_TX_PORT                    GPIOB
#define ENG_TX_PIN                     GPIO_PIN_6

#define ENG_RX_PORT                    GPIOB
#define ENG_RX_PIN                     GPIO_PIN_7

/** [GSM]USART2
-------------------------------------------------*/
#define GSM_TX_PORT                    GPIOB
#define GSM_TX_PIN                     GPIO_PIN_4

#define GSM_RX_PORT                    GPIOB
#define GSM_RX_PIN                     GPIO_PIN_5

#define GSM_IO_PORT                    GPIOB
#define GSM_IO_PIN                     GPIO_PIN_13

/** [Key]
-------------------------------------------------*/
#define KEY01_PORT                     GPIOB
#define KEY01_PIN                      GPIO_PIN_11

/** [Debug]LPUART
-------------------------------------------------*/
#define DBG_TX_PORT                    GPIOB
#define DBG_TX_PIN                     GPIO_PIN_1

#define DBG_RX_PORT                    GPIOA
#define DBG_RX_PIN                     GPIO_PIN_10


/* Exported typedef -------------------------------------*/
/* Exported functions -----------------------------------*/

#endif

